package com.cyzy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cyzy.mapper.ActivityMapper;
import com.cyzy.pojo.Activity;

import com.cyzy.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ActivityServiceImpl extends ServiceImpl<ActivityMapper, Activity> implements ActivityService {
    @Autowired
    private ActivityMapper activityMapper;
    @Override
    public List<Activity> getList(Activity activity) {

        return activityMapper.selectList(null);
    }

    @Override
    public IPage<Activity> selectPage(Page page, Activity activity) {
        QueryWrapper<Activity> queryWrapper = new QueryWrapper<>();
        return activityMapper.selectPage(page, queryWrapper);
    }
}
